using B.S.XZYData.ErrorCode;
using MediatR;
using System.Collections.Generic;

namespace B.S.XZYData.Api.Wrter.Application.Command.Plan
{
    /// <summary>
    /// 批量删除生产计划命令
    /// </summary>
    public class BatchDeletePlanCommand : IRequest<ApiResult<BatchDeletePlanResult>>
    {
        /// <summary>
        /// 要删除的计划ID列表
        /// </summary>
        public List<int> PlanIds { get; set; } = new List<int>();

        /// <summary>
        /// 操作人
        /// </summary>
        public string OperateBy { get; set; }
    }

    /// <summary>
    /// 批量删除生产计划结果
    /// </summary>
    public class BatchDeletePlanResult
    {
        /// <summary>
        /// 成功删除的计划ID列表
        /// </summary>
        public List<int> SuccessPlanIds { get; set; } = new List<int>();

        /// <summary>
        /// 删除失败的计划信息
        /// </summary>
        public List<FailedPlanInfo> FailedPlans { get; set; } = new List<FailedPlanInfo>();

        /// <summary>
        /// 总数量
        /// </summary>
        public int TotalCount { get; set; }

        /// <summary>
        /// 成功数量
        /// </summary>
        public int SuccessCount { get; set; }

        /// <summary>
        /// 失败数量
        /// </summary>
        public int FailedCount { get; set; }
    }

    /// <summary>
    /// 删除失败的计划信息
    /// </summary>
    public class FailedPlanInfo
    {
        /// <summary>
        /// 计划ID
        /// </summary>
        public int PlanId { get; set; }

        /// <summary>
        /// 失败原因
        /// </summary>
        public string Reason { get; set; }
    }
} 